﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example25.aspx.cs" Inherits="Chapter05.Example25" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 5-25 将字符串转换为数值</title>
</head>
<body>
    <form>
        <div>
            <script type="text/javascript">
                var firstVal = "5";
                var secondVal = "5";
                var result = Number(firstVal) + Number(secondVal);

                document.writeln("Result : " + result);
            </script>
        </div>
    </form>
</body>
</html>
